package lanou3g.myfirstapp36kr.fragment;

import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ListView;

import lanou3g.myfirstapp36kr.R;
import lanou3g.myfirstapp36kr.activity.MessageActivity;
import lanou3g.myfirstapp36kr.base.BaseFragment;

/**
 * Created by dllo on 16/8/2.
 */
public class MessageFragment extends BaseFragment implements OnClickListener {

    @Override
    protected int getLayout() {
        return R.layout.fragment_message;
    }

    @Override
    protected void initView(View view) {
        view.findViewById(R.id.person_message).setOnClickListener(this);
        view.findViewById(R.id.argument).setOnClickListener(this);
        view.findViewById(R.id.nice).setOnClickListener(this);
        view.findViewById(R.id.custom_service).setOnClickListener(this);
        view.findViewById(R.id.order_message).setOnClickListener(this);


    }

    @Override
    protected void initData() {

    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.person_message:
                Intent intentPerson = new Intent(this.getActivity(), MessageActivity.class);
                intentPerson.putExtra("tv","私信");
                startActivity(intentPerson);
                break;
            case R.id.argument:
                Intent intentArgument = new Intent(this.getActivity(), MessageActivity.class);
                intentArgument.putExtra("tv","评论");
                startActivity(intentArgument);
                break;
            case R.id.nice:
                Intent intentNice = new Intent(this.getActivity(), MessageActivity.class);
                intentNice.putExtra("tv","赞");
                startActivity(intentNice);
                break;
            case R.id.custom_service:
                Intent intentService = new Intent(this.getActivity(), MessageActivity.class);
                intentService.putExtra("tv","客服助手");
                startActivity(intentService);
                break;
            case R.id.order_message:
                Intent intentOther = new Intent(this.getActivity(), MessageActivity.class);
                intentOther.putExtra("tv","其他消息");
                startActivity(intentOther);
                break;
        }

    }
}
